package com.atguigu.eduservice.config;


import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 分页插件
 */
@Configuration
 // todo 被修改了
@MapperScan("com.atguigu.eduservice.mapper")
@EnableAspectJAutoProxy
@EnableTransactionManagement //添加事务处理机制->在进行多表操作时
@ComponentScan({"com.atguigu.eduservice.controller.controllerVo","com.atguigu.common"})
public class MybatisPlusConfig {

	/**
	 * 分页插件
	 */
	@Bean
	public PaginationInterceptor paginationInterceptor() {
		return new PaginationInterceptor();
	}

}
